﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Register</title>
<link rel="stylesheet" type="text/css" href="../S01/CHS/css/common.css" />
<link rel="stylesheet" type="text/css" href="../S01/CHS/css/date_picker.css" />
<script type="text/javascript" src="/common/ajax.js"></script>
<script type="text/javascript" src="../js/date_picker.js"></script>
<script type="text/javascript">
if (window.location.search.length > 1)
	window.location.replace("agreement.htm");

function XmlHttpCallBack(xmlHttp)
{
	if (xmlHttp.responseText.indexOf("<error>") != 0)
	{
		alert("注册成功！");
		window.location.href = "login.aspx";
	}
	else
	{
		alert(xmlHttp.responseText);
	}

	document.getElementById("Submit1").disabled = false;
	document.getElementById("Submit2").disabled = false;
}

function OnSubmit(form)
{
	if (form.Name.value == "")
	{
		alert("名称不能空！");
		form.Name.select();
		return false;
	}
	
	if (form.Password.value == "")
	{
		alert("密码不能为空！");
		form.Password.select();
		return false;
	}
	
	if (form.Password.value != form.Confirm.value)
	{
		alert("重复的密码跟原密码不一致！");
		form.Confirm.select();
		return false;
	}
	
	if (form.PasswordQuestion.value == "")
	{
		alert("密码问题不能为空！");
		form.PasswordQuestion.select();
		return false;
	}
	
	if (form.PasswordAnswer.value == "")
	{
		alert("密码答案不能为空！");
		form.PasswordAnswer.select();
		return false;
	}
	
	if (form.Email.value.match(/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/) == null)
	{
		alert("Email地址格式不正确！");
		form.Email.select();
		return false;
	}
	
	var data = "GroupID=" + window.location.search.substr(1);
	data += "&Name=" + form.Name.value;
	data += "&Password=" + form.Password.value;
	data += "&PasswordQuestion=" + form.PasswordQuestion.value;
	data += "&PasswordAnswer=" + form.PasswordAnswer.value;
	data += "&Email=" + form.Email.value;
	data += "&RealName=" + form.RealName.value;
	data += "&Birthday=" + form.Birthday.value;
	data += "&Phone=" + form.Phone.value;
	data += "&Mobile=" + form.Mobile.value;
	data += "&Address=" + form.Address.value;
	data += "&Zip=" + form.Zip.value;
	data += "&Homepage=" + form.Homepage.value;
	data += "&QQ=" + form.QQ.value;
	data += "&MSN=" + form.MSN.value;
	data += "&SexID=" + form.SexID.value;
	data += "&RegionID=" + form.RegionID.value;
	data += "&IndustryID=" + form.IndustryID.value;
	data += "&CertificateTypeID=" + form.CertificateTypeID.value;
	data += "&Certificate=" + form.Certificate.value;
	data += "&IsChecked=false&IsDeleted=false&IsLocked=false";
	
	document.getElementById("Submit1").disabled = true;
	document.getElementById("Submit2").disabled = true;
	_ajax.Post("/alicms.aspx?Object=Member&Operation=Add", data, XmlHttpCallBack);
	return false;
}
</script>
</head>
<body>
<!-- #BeginLibraryItem "lib/header.lbi" -->
<div class="Header">
	<a href="http://alicms.cn"><img src="../S01/CHS/image/temp/logo.gif" /></a>
	<a href="http://alicms.cn"><img src="../S01/CHS/image/temp/banner.jpg" /></a>
</div>
<!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "lib/menu.lbi" -->
<ul class="TabMenuBar">
	<li class="Current"><a href="#"><span>会员中心</span></a></li>
	<li><a href="#"><span>网上商店</span></a></li>
	<li><a href="#"><span>文章管理</span></a></li>
	<li><a href="#"><span>新闻管理</span></a></li>
	<li><a href="#"><span>音乐管理</span></a></li>
	<li><a href="#"><span>图片管理</span></a></li>
	<li><a href="#"><span>视频管理</span></a></li>
	<li><a href="#"><span>电影管理</span></a></li>
	<li><a href="#"><span>网址管理</span></a></li>
</ul>
<div class="MenuBar">
	<a href="#">会员登陆</a>
	<a href="#">会员注册</a>
</div>
<!-- #EndLibraryItem -->
<div class="Path"><label>当前位置：</label> <a href="#">首页</a> &gt; <a href="#">会员中心</a> &gt; 会员注册</div>
<div class="Wrap">
	<div class="Block1">
		<h1>温馨提示</h1>
		<ul class="List1">
			<li>只填写必填项，就可以快速地注册成为会员。</li>
			<li>为了其他会员之间有效沟通，请仔细填写每一项。</li>
		</ul>
	</div>
	<div class="Block2">
		<form onsubmit="return OnSubmit(this)" class="Block3">
			以下是必填项：
			<dl>
				<dt>会员名：</dt>
				<dd><input type="text" name="Name" maxlength="50" /></dd>
			</dl>
			<dl>
				<dt>密码：</dt>
				<dd><input type="password" name="Password" maxlength="50" /></dd>
			</dl>
			<dl>
				<dt>重复密码：</dt>
				<dd><input type="password" name="Confirm" maxlength="50" /></dd>
			</dl>
			<dl>
				<dt>密码提示问题：</dt>
				<dd><input type="text" name="PasswordQuestion" maxlength="50" /></dd>
			</dl>
			<dl>
				<dt>提示问题答案：</dt>
				<dd><input type="text" name="PasswordAnswer" maxlength="50" /></dd>
			</dl>
			<dl>
				<dt>注册邮箱：</dt>
				<dd><input type="text" name="Email" size="30" maxlength="255" /></dd>
			</dl>
			<input type="submit" id="Submit1" value="快速注册" /><br /><br />
			以下是选填项：
			<dl>
				<dt>真实姓名：</dt>
				<dd><input type="text" name="RealName" maxlength="50" /></dd>
			</dl>
			<dl>
				<dt>生日：</dt>
				<dd><script type="text/javascript">createDatePicker("Birthday", "1900", "1", "1");</script></dd>
			</dl>
			<dl>
				<dt>联系电话：</dt>
				<dd><input type="text" name="Phone" maxlength="50" /></dd>
			</dl>
			<dl>
				<dt>手机：</dt>
				<dd><input type="text" name="Mobile" maxlength="50" /></dd>
			</dl>
			<dl>
				<dt>通讯地址：</dt>
				<dd><input type="text" name="Address" size="50" maxlength="255" /></dd>
			</dl>
			<dl>
				<dt>邮编：</dt>
				<dd><input type="text" name="Zip" maxlength="50" /></dd>
			</dl>
			<dl>
				<dt>个人主页：</dt>
				<dd><input type="text" name="Homepage" size="50" maxlength="255" /></dd>
			</dl>
			<dl>
				<dt>QQ：</dt>
				<dd><input type="text" name="QQ" maxlength="50" /></dd>
			</dl>
			<dl>
				<dt>MSN：</dt>
				<dd><input type="text" name="MSN" size="50" maxlength="255" /></dd>
			</dl>
			<dl>
				<dt>性别：</dt>
				<dd>
					<select name="SexID">
						<option value="">未指定</option>
						{#SexOptions#}
					</select>
				</dd>
			</dl>
			<dl>
				<dt>所属地区：</dt>
				<dd>
					<select name="RegionID">
						<option value="">未指定</option>
						{#RegionOptions#}
					</select>
				</dd>
			</dl>
			<dl>
				<dt>所属行业：</dt>
				<dd>
					<select name="IndustryID">
						<option value="">未指定</option>
						{#IndustryOptions#}
					</select>
				</dd>
			</dl>
			<dl>
				<dt>证件类型：</dt>
				<dd>
					<select name="CertificateTypeID">
						<option value="">未指定</option>
						{#CertificateTypeOptions#}
					</select>
				</dd>
			</dl>
			<dl>
				<dt>证件号码：</dt>
				<dd><input type="text" name="Certificate" maxlength="50" /></dd>
			</dl>
			<input type="submit" id="Submit2" value="注册" />
		</form>
	</div>
</div>
<!-- #BeginLibraryItem "lib/footer.lbi" -->
<div class="Footer"> 版权所有 乌鲁木齐爱革网络科技有限公司 <br />
		<br />
	<br />
	<br />
	<br />
	<br />
	<br />
</div>
<!-- #EndLibraryItem -->
</body>
</html>
